package com.lmx.repoDomain.tmodel;

import io.katharsis.resource.annotations.JsonApiResource;
import io.katharsis.resource.annotations.JsonApiToOne;

import javax.persistence.*;

/**
 * 客户标签表
 */
@Entity
@Table(name = "ccd_task_language")
@JsonApiResource(type = "taskLanguage")
public class TaskLanguage extends BaseEntity {
	private String code; // 编码
	private Task task;//任务
	private Dicttype language;//语言
	private String remark;//备注

	@Column(name = "code")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@JsonApiToOne
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
	@JoinColumn(name = "task_id",foreignKey = @ForeignKey(name = "null"))
	public Task getTask() {
		return task;
	}

	public void setTask(Task task) {
		this.task = task;
	}

	@JsonApiToOne
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
	@JoinColumn(name = "language_id",foreignKey = @ForeignKey(name = "null"))
	public Dicttype getLanguage() {
		return language;
	}

	public void setLanguage(Dicttype language) {
		this.language = language;
	}


	@Column(name = "remark")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
}
